﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UoMSetupForm.aspx.cs" Inherits="FBKPI.Forms.UoMSetupForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        $(document).ready(function () {

            $("#btn_savedetail").click(function () {
                var param = "?";
                var isActive = 'false';

                $('#form1 td input:checked').each(function () {
                    var $cb = $(this);
                    if ($cb.attr('id') == 'chk_active') {
                        isActive = 'true';
                    }
                });

                param = param + "action=save";
                param = param + "&ID=" + $("#hfIdUom").val();
                param = param + "&Description=" + $("#txt_descriptionUom").val();
                param = param + "&Format=" + $("#ddl_format").val();
                param = param + "&isActive=" + isActive;
                param = param + "&CurrUser=" + $("#txt_user").val();
                ProcessRequest("UoMHandler.ashx" + param, "#divdetailInputUom", "#KPITable");
                return false;
            });


           

            $("#btn_closedetail").click(function () {
                //alert("a");
                parent.$("#divdetailInputUom").dialog("close");
                return false;
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="uomformarea" class="ui-widget-content padding5px ui-corner-all">
        <table class="dialogTable">
            <tr runat="server" visible="false">
                <td width="140px">
                    ID
                </td>
                <td class="Separator">
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_id" runat="server" ReadOnly="true"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Description
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_descriptionUom" runat="server" Width="300" class="mandatory"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Format
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:DropDownList ID="ddl_format" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    is Active
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:CheckBox ID="chk_active" Checked="true" runat="server" />
                </td>
            </tr>
        </table>
    </div>
    <br />
   
    <br />
    <button id="btn_savedetail" class="button save">
        Save
    </button>
    <button id="btn_closedetail" class="button close">
        Close
    </button>
   
    <asp:HiddenField ID="hfIdUom" runat="server" Value="0" />
    </form>
</body>
</html>
